//888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
//
//	File		 :	std_helper.h
//	Contents	 :	Source file for various useful functions adding to the standard
//					library
//	Creation Data:	11/04/2000
//	Last Modified:	11/04/2000	lg
//
//888888888888888888888888888888888888888888888888888888888888888888888888888888888888888

#if !defined(STD_HELPER_H)
#define STD_HELPER_H

#include <string>
#include <algorithm>
#include <ctype.h>

inline void RemoveCharFromString(std::string& s, char c)
{
	s.erase(std::remove(s.begin(), s.end(), c), s.end());
}

inline void RemoveCharsFromString(std::string& from, const std::string& any_of)
{
	std::string::const_iterator i = any_of.begin();
	while (i != any_of.end())
		RemoveCharFromString(from, *i++);
}
struct ToUpper {void operator()(char & c){toupper(c);}};
inline int stricmp(std::string a, std::string b)
{
	std::for_each(a.begin(), a.end(), ToUpper());
	std::for_each(b.begin(), b.end(), ToUpper());
	return a.compare(b);
}

#endif // !defined(STD_HELPER_H)
